package com.sm.ticket.feigns.fallback;

import com.sm.ticket.feigns.UserFeignClient;
import com.sm.tool.entity.po.User_;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @program: practice
 * @description:
 * @author: liqitian.
 * @create: 2019-11-27 14:29
 **/
@Slf4j
@Component
@RequestMapping("fallback/api/v2/oper")
public class UserFeignClientFallBack implements UserFeignClient {

    @Setter
    private Throwable cause;

    @Override
    public boolean check_exist_admin(Long adminUserId) {
        log.info("检查管理员身份失败:{}",cause);
        return false;
    }

    @Override
    public User_ getUserInfo(Long userId) {
        log.info("获取用户信息失败:{}",cause);
        return null;
    }
}
